package com.atguigu.crowd.service.impl;

import com.atguigu.crowd.entity.Project;
import com.atguigu.crowd.entity.ProjectManger;
import com.atguigu.crowd.mapper.MemberMapper;
import com.atguigu.crowd.mapper.ProjectMapper;
import com.atguigu.crowd.service.api.ProjectMangerService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class ProjectMangerServiceImpl implements ProjectMangerService {

    @Autowired
    private MemberMapper memberMapper;

    @Autowired
    private ProjectMapper projectMapper;

    //更新member表的failedNum
    @Override
    public void updateMemberForFailed(int memberId) {
        memberMapper.updateMemberFailedNum(memberId);
    }

    //更新project表的项目阶段
    @Override
    public void updateProject(Integer selectVal, int projectId) {
        projectMapper.updateProjectStatus(selectVal,projectId);
    }
}
